package ferp.android.dialogs;

import android.content.Context;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import ferp.android.GUI;
import ferp.android.R;

/**
 * User: olegs
 * Date: 30/05/12 14:18
 */
public class InfoDialog extends Dialog
{
  public InfoDialog(Context context, int text)
  {
    super(context, R.layout.dialog_info, R.string.attention);

    setCancelable(true);

    TextView message = (TextView)findViewById(R.id.dlg_info_text);

    message.setText(text);
    message.setTypeface(GUI.Font.BOLD);

    Button close = resolveButton(R.id.dlg_element_footer_button, R.string.close);

    close.setOnClickListener(new View.OnClickListener()
    {
      public void onClick(View view)
      {
        dismiss();
      }
    });
  }
}
